#include "BelkaSprite.h"

//Klasa przechowywujaca Kod bohatera

BelkaSprite* BelkaSprite::utworz(int type, int x, int y, const char* name,
		bool monster) {
	BelkaSprite *sprite = new BelkaSprite();
	if (sprite && sprite->initWithParams(type, x, y, name, monster)) {
		sprite->autorelease();
		return sprite;
	}
	CC_SAFE_DELETE(sprite);
	return NULL;

}

bool BelkaSprite::initWithParams(int type, int x, int y, const char* name,
		bool monster) {
	if (type == 1) {
		this->initWithFile("belka_dluga.png");
	} else {
		this->initWithFile("belka_krotka.png");
	}
	thisname = name;
	shouldmonster = monster;
	this->setPosition(ccp(x,y));
	return true;
}

float BelkaSprite::getWidth() {
	return this->getContentSize().width;
}

